package com.kc.data.common.domain.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.time.LocalDateTime;

/**
 * @ClassName YsUser
 * @Description 用户表实体
 * @Author wangdongliang
 * @Date 2021/4/23 12:06
 */
@Data
public class YsUser {

    @TableId
    /*主键id*/
    private Integer id;
    /*用户名*/
    private String username = "";
    /*班级id*/
    private Integer classId = 0;
    /*机构id*/
    private Integer organizationId = 0;
    @NotBlank(message = "昵称不能为空")
    private String nickname;
    @NotBlank(message = "手机号码不能为空")
    private String mobile;
    @NotBlank(message = "头像不能为空")
    private String avatar;
    @NotBlank(message = "性别不能为空")
    private String sex;
    @NotEmpty(message = "openid不能为空")
    private String openid;
    @NotBlank(message = "unionid不能为空")
    private String unionid;
    /*用户密码*/
    private String password;
    /*注册时间*/
    @TableField(fill = FieldFill.INSERT)
    private String createTime;
    /*最后修改时间*/
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateTime;

    private Integer cityId;


}
